package mdoc.ejbsample;


import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="COMPTES", schema="test")
@NamedQueries({
	@NamedQuery(name = "findAllComptes",   query = "select c from Compte c"),
	@NamedQuery(name = "findCompteByName", query = "select c from Compte c WHERE c.name = :cname")
		})
public class Compte implements Serializable {
	@Id @GeneratedValue(strategy = GenerationType.AUTO)
	private int id;

	private String name;

	private float solde;

	private static final long serialVersionUID = 1L;

	public Compte() {
		super();
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public float getSolde() {
		return this.solde;
	}

	public void setSolde(float solde) {
		this.solde = solde;
	}

}
